package wzvtc.dbad.attend.entity;


import org.springframework.data.annotation.AccessType;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

/**
 * 某次考勤的某位同学的考勤明细记录
 */
@AccessType(AccessType.Type.FIELD)
@Table("T_ATTENDENCE_DETAIL")
public class AttendenceDetail {
    private @Id long id;
    /**
     * 该考勤明细记录对应的考勤表
     */
    private long parentId;
    /**
     * 参与考勤的学生id，
     */
    private long studentId;
    /**
     * 考勤状态，默认为正常出勤
     */
    private AttendDetailState state =AttendDetailState.已签;

    public AttendenceDetail(long parentId, long studentId, AttendDetailState state) {
        this.parentId = parentId;
        this.studentId = studentId;
        this.state = state;
    }

    public long getId() {
        return id;
    }

    public long getParentId() {
        return parentId;
    }

    public long getStudentId() {
        return studentId;
    }

    public AttendDetailState getState() {
        return state;
    }
}
